package main

import (
	"time"
	"fmt"
)

func main()  {
	t1:=time.Now()
	t2:=t1.Add(time.Nanosecond) //在当前时间上，累加1纳秒
	fmt.Println(t2)
	t3:=t1.Add(time.Minute)
	fmt.Println(t3)

	t4:=t1.Add(time.Hour*24)
	fmt.Println(t4)

	t5:=t1.AddDate(0,0,3)
	d1:=t4.Sub(t1)
	fmt.Println(d1)
	fmt.Println(t3.Sub(t1))

	fmt.Println(t1.After(t5)) //false
	fmt.Println(t1.Before(t5)) //true


}
